FUNCTION: Join( )
Join(Array, Delimiter)
The Join function combines substrings (elements) of an array together
into one long string with each substring separated by the delimiter string.
There is one mandatory argument.
Array
The Array argument is the name of the array to be joined.
Code:
<% Dim cowarray(10) %>
<% cowarray(0) = "How" %>
<% cowarray(1) = "now" %>
<% cowarray(2) = "brown" %>
<% cowarray(3) = "cow?" %>
<% Join(cowarray) %>
Output:
How now brown cow?
There is one optional argument.
Delimiter
The optional Delimiter argument specifies the characters (including blanks) you
wish to place between each element. If this argument is not specifified, the default is to place a blank space
between each element. If you wish to have no spaces, use a double quote, "", for the argument.
Code:
<% Dim arraycow(10) %>
<% arraycow(0) = "How" %>
<% arraycow(1) = "now" %>
<% arraycow(2) = "brown" %>
<% arraycow(3) = "cow?" %>
<% =Join(arraycow, 1234) %>
<% =Join(arraycow, "****") %>
<% =Join(arraycow, "") %>
Output:
How1234now1234brown1234cow?1234123412341234123412341234
How****now****brown****cow?****************************
Hownowbrowncow?